<%@ page import="activity.Inform" %>

<div class="fieldcontain ${hasErrors(bean: informInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="inform.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${informInstance?.name}" size="40" />
</div>

<div class="fieldcontain ${hasErrors(bean: informInstance, field: 'active', 'error')} ">
    <label for="active">
        <g:message code="inform.active.label" default="Active" />

    </label>
    <g:select name="active" from="${informInstance.constraints.active.inList}" value="${informInstance?.active}" valueMessagePrefix="inform.active" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: informInstance, field: 'subject', 'error')} ">
	<label for="subject">
		<g:message code="inform.subject.label" default="Memo" />
		
	</label>
	<g:textField name="subject" value="${informInstance?.subject}" size="40" />
</div>

<div class="fieldcontain">
    <label for="content">欄位</label>
    <div style="display:inline-block">
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#serial.name#');">活動名稱</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#event.name#');">場次名稱</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#event.place#');">場次地點</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#event.dateStart#');">開始時間</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#event.dateEnd#');">結束時間</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#event.checkInStart#');">報到開始</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#event.checkInEnd#');">報到結束</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#event.checkIn#');">報到方式</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#reader.name#');">讀者姓名</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#register.sysCode#');">系統碼</a>
    <a onclick="javascript:CKEDITOR.instances.content.insertText('#register.cancelCode#');">取消碼</a>
    <!--<a onclick="javascript:CKEDITOR.instances.content.insertText('#reader.meat#');">用餐</a>-->
    <!--<a onclick="javascript:CKEDITOR.instances.content.insertText('#reader.sleep#');">住宿</a>-->
    </div>
</div>

<div class="fieldcontain ${hasErrors(bean: informInstance, field: 'content', 'error')} required">
	<label for="content">
		<g:message code="inform.content.label" default="Content" />
		<span class="required-indicator">*</span>
	</label>
	<m:ckeditor name="content" value="${informInstance?.content}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: informInstance, field: 'timing', 'error')} ">
	<label for="timing">
		<g:message code="inform.timing.label" default="Timing" />
		
	</label>
	<g:select name="timing" from="${informInstance.constraints.timing.inList}" value="${informInstance?.timing}" valueMessagePrefix="inform.timing" noSelection="['': '']"/>
</div>